package com.democxy.modules.cms.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.democxy.common.baseData.BaseEntity;

/**
 * 广告管理Entity
 * @author democxy
 * @version 2020-03-13
 */
public class AdHref extends BaseEntity<AdHref> {
	
	private static final long serialVersionUID = 1L;
	private String id;
	private String pic;		// 图片
	private String name;		// 名称
	private String href;		// 链接
	private String target;		// 目标
	private Integer sort;		// 排序
	private String type;		// 类型
	private String status;		// 状态
	
	public AdHref() {
		super();
	}

	public AdHref(String id){
		this.id = id;
	}
	
	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}
	

	@Length(min=0, max=200, message="图片长度必须介于 0 和 200 之间")
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}
	
	@Length(min=1, max=100, message="名称长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=1000, message="链接长度必须介于 1 和 1000 之间")
	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}
	
	@Length(min=0, max=10, message="目标长度必须介于 0 和 10 之间")
	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}
	
	@NotNull(message="排序不能为空")
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@Length(min=1, max=10, message="类型长度必须介于 1 和 10 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=1, max=10, message="状态长度必须介于 1 和 10 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
}